3.1.17 \(\int x (a+b \csc ^{-1}(c x))^2 \, dx\) [17]

Optimal. Leaf size=55 \[ \frac {b \sqrt {1-\frac {1}{c^2 x^2}} x \left (a+b \csc ^{-1}(c x)\right )}{c}+\frac {1}{2} x^2 \left (a+b \csc ^{-1}(c x)\right )^2+\frac {b^2 \log (x)}{c^2} \]

[Out]

1/2*x^2*(a+b*arccsc(c*x))^2+b^2*ln(x)/c^2+b*x*(a+b*arccsc(c*x))*(1-1/c^2/x^2)^(1/2)/c

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5331, 4495, 4269, 3556} \begin {gather*} \frac {b x \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \csc ^{-1}(c x)\right )}{c}+\frac {1}{2} x^2 \left (a+b \csc ^{-1}(c x)\right )^2+\frac {b^2 \log (x)}{c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(a + b*ArcCsc[c*x])^2,x]

[Out]

(b*Sqrt[1 - 1/(c^2*x^2)]*x*(a + b*ArcCsc[c*x]))/c + (x^2*(a + b*ArcCsc[c*x])^2)/2 + (b^2*Log[x])/c^2

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4269

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 4495

Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[
(-(c + d*x)^m)*(Csc[a + b*x]^n/(b*n)), x] + Dist[d*(m/(b*n)), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /;
FreeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 5331

Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))^(n_)*(x_)^(m_.), x_Symbol] :> Dist[-(c^(m + 1))^(-1), Subst[Int[(a + b*
x)^n*Csc[x]^(m + 1)*Cot[x], x], x, ArcCsc[c*x]], x] /; FreeQ[{a, b, c}, x] && IntegerQ[n] && IntegerQ[m] && (G
tQ[n, 0] || LtQ[m, -1])

Rubi steps

\begin {align*} \int x \left (a+b \csc ^{-1}(c x)\right )^2 \, dx &=-\frac {\text {Subst}\left (\int (a+b x)^2 \cot (x) \csc ^2(x) \, dx,x,\csc ^{-1}(c x)\right )}{c^2}\\ &=\frac {1}{2} x^2 \left (a+b \csc ^{-1}(c x)\right )^2-\frac {b \text {Subst}\left (\int (a+b x) \csc ^2(x) \, dx,x,\csc ^{-1}(c x)\right )}{c^2}\\ &=\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x \left (a+b \csc ^{-1}(c x)\right )}{c}+\frac {1}{2} x^2 \left (a+b \csc ^{-1}(c x)\right )^2-\frac {b^2 \text {Subst}\left (\int \cot (x) \, dx,x,\csc ^{-1}(c x)\right )}{c^2}\\ &=\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x \left (a+b \csc ^{-1}(c x)\right )}{c}+\frac {1}{2} x^2 \left (a+b \csc ^{-1}(c x)\right )^2+\frac {b^2 \log (x)}{c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 89, normalized size = 1.62 \begin {gather*} \frac {a c x \left (2 b \sqrt {1-\frac {1}{c^2 x^2}}+a c x\right )+2 b c x \left (b \sqrt {1-\frac {1}{c^2 x^2}}+a c x\right ) \csc ^{-1}(c x)+b^2 c^2 x^2 \csc ^{-1}(c x)^2+2 b^2 \log (c x)}{2 c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*ArcCsc[c*x])^2,x]

[Out]

(a*c*x*(2*b*Sqrt[1 - 1/(c^2*x^2)] + a*c*x) + 2*b*c*x*(b*Sqrt[1 - 1/(c^2*x^2)] + a*c*x)*ArcCsc[c*x] + b^2*c^2*x
^2*ArcCsc[c*x]^2 + 2*b^2*Log[c*x])/(2*c^2)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(126\) vs. \(2(51)=102\).
time = 0.41, size = 127, normalized size = 2.31

method result size
derivativedivides \(\frac {\frac {c^{2} x^{2} a^{2}}{2}+\frac {b^{2} \mathrm {arccsc}\left (c x \right )^{2} c^{2} x^{2}}{2}+b^{2} \mathrm {arccsc}\left (c x \right ) c x \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}-b^{2} \ln \left (\frac {1}{c x}\right )+2 a b \left (\frac {c^{2} x^{2} \mathrm {arccsc}\left (c x \right )}{2}+\frac {c^{2} x^{2}-1}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}\right )}{c^{2}}\) \(127\)
default \(\frac {\frac {c^{2} x^{2} a^{2}}{2}+\frac {b^{2} \mathrm {arccsc}\left (c x \right )^{2} c^{2} x^{2}}{2}+b^{2} \mathrm {arccsc}\left (c x \right ) c x \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}-b^{2} \ln \left (\frac {1}{c x}\right )+2 a b \left (\frac {c^{2} x^{2} \mathrm {arccsc}\left (c x \right )}{2}+\frac {c^{2} x^{2}-1}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}\right )}{c^{2}}\) \(127\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arccsc(c*x))^2,x,method=_RETURNVERBOSE)

[Out]

1/c^2*(1/2*c^2*x^2*a^2+1/2*b^2*arccsc(c*x)^2*c^2*x^2+b^2*arccsc(c*x)*c*x*((c^2*x^2-1)/c^2/x^2)^(1/2)-b^2*ln(1/
c/x)+2*a*b*(1/2*c^2*x^2*arccsc(c*x)+1/2/((c^2*x^2-1)/c^2/x^2)^(1/2)/c/x*(c^2*x^2-1)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 84, normalized size = 1.53 \begin {gather*} \frac {1}{2} \, b^{2} x^{2} \operatorname {arccsc}\left (c x\right )^{2} + \frac {1}{2} \, a^{2} x^{2} + {\left (x^{2} \operatorname {arccsc}\left (c x\right ) + \frac {x \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{c}\right )} a b + {\left (\frac {x \sqrt {-\frac {1}{c^{2} x^{2}} + 1} \operatorname {arccsc}\left (c x\right )}{c} + \frac {\log \left (x\right )}{c^{2}}\right )} b^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arccsc(c*x))^2,x, algorithm="maxima")

[Out]

1/2*b^2*x^2*arccsc(c*x)^2 + 1/2*a^2*x^2 + (x^2*arccsc(c*x) + x*sqrt(-1/(c^2*x^2) + 1)/c)*a*b + (x*sqrt(-1/(c^2
*x^2) + 1)*arccsc(c*x)/c + log(x)/c^2)*b^2

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 111 vs. \(2 (51) = 102\).
time = 0.43, size = 111, normalized size = 2.02 \begin {gather*} \frac {b^{2} c^{2} x^{2} \operatorname {arccsc}\left (c x\right )^{2} + a^{2} c^{2} x^{2} - 4 \, a b c^{2} \arctan \left (-c x + \sqrt {c^{2} x^{2} - 1}\right ) + 2 \, b^{2} \log \left (x\right ) + 2 \, {\left (a b c^{2} x^{2} - a b c^{2}\right )} \operatorname {arccsc}\left (c x\right ) + 2 \, \sqrt {c^{2} x^{2} - 1} {\left (b^{2} \operatorname {arccsc}\left (c x\right ) + a b\right )}}{2 \, c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arccsc(c*x))^2,x, algorithm="fricas")

[Out]

1/2*(b^2*c^2*x^2*arccsc(c*x)^2 + a^2*c^2*x^2 - 4*a*b*c^2*arctan(-c*x + sqrt(c^2*x^2 - 1)) + 2*b^2*log(x) + 2*(
a*b*c^2*x^2 - a*b*c^2)*arccsc(c*x) + 2*sqrt(c^2*x^2 - 1)*(b^2*arccsc(c*x) + a*b))/c^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \left (a + b \operatorname {acsc}{\left (c x \right )}\right )^{2}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*acsc(c*x))**2,x)

[Out]

Integral(x*(a + b*acsc(c*x))**2, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 427 vs. \(2 (51) = 102\).
time = 0.50, size = 427, normalized size = 7.76 \begin {gather*} \frac {1}{8} \, {\left (\frac {b^{2} x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2} \arcsin \left (\frac {1}{c x}\right )^{2}}{c} + \frac {2 \, a b x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2} \arcsin \left (\frac {1}{c x}\right )}{c} + \frac {a^{2} x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2}}{c} + \frac {4 \, b^{2} x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )} \arcsin \left (\frac {1}{c x}\right )}{c^{2}} + \frac {4 \, a b x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}}{c^{2}} + \frac {2 \, b^{2} \arcsin \left (\frac {1}{c x}\right )^{2}}{c^{3}} + \frac {4 \, a b \arcsin \left (\frac {1}{c x}\right )}{c^{3}} - \frac {16 \, b^{2} \log \left (2\right )}{c^{3}} + \frac {8 \, b^{2} \log \left (2 \, \sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 2\right )}{c^{3}} - \frac {8 \, b^{2} \log \left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}{c^{3}} - \frac {8 \, b^{2} \log \left (\frac {1}{{\left | c \right |} {\left | x \right |}}\right )}{c^{3}} + \frac {2 \, a^{2}}{c^{3}} - \frac {4 \, b^{2} \arcsin \left (\frac {1}{c x}\right )}{c^{4} x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}} - \frac {4 \, a b}{c^{4} x {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}} + \frac {b^{2} \arcsin \left (\frac {1}{c x}\right )^{2}}{c^{5} x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2}} + \frac {2 \, a b \arcsin \left (\frac {1}{c x}\right )}{c^{5} x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2}} + \frac {a^{2}}{c^{5} x^{2} {\left (\sqrt {-\frac {1}{c^{2} x^{2}} + 1} + 1\right )}^{2}}\right )} c \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arccsc(c*x))^2,x, algorithm="giac")

[Out]

1/8*(b^2*x^2*(sqrt(-1/(c^2*x^2) + 1) + 1)^2*arcsin(1/(c*x))^2/c + 2*a*b*x^2*(sqrt(-1/(c^2*x^2) + 1) + 1)^2*arc
sin(1/(c*x))/c + a^2*x^2*(sqrt(-1/(c^2*x^2) + 1) + 1)^2/c + 4*b^2*x*(sqrt(-1/(c^2*x^2) + 1) + 1)*arcsin(1/(c*x
))/c^2 + 4*a*b*x*(sqrt(-1/(c^2*x^2) + 1) + 1)/c^2 + 2*b^2*arcsin(1/(c*x))^2/c^3 + 4*a*b*arcsin(1/(c*x))/c^3 -
16*b^2*log(2)/c^3 + 8*b^2*log(2*sqrt(-1/(c^2*x^2) + 1) + 2)/c^3 - 8*b^2*log(sqrt(-1/(c^2*x^2) + 1) + 1)/c^3 -
8*b^2*log(1/(abs(c)*abs(x)))/c^3 + 2*a^2/c^3 - 4*b^2*arcsin(1/(c*x))/(c^4*x*(sqrt(-1/(c^2*x^2) + 1) + 1)) - 4*
a*b/(c^4*x*(sqrt(-1/(c^2*x^2) + 1) + 1)) + b^2*arcsin(1/(c*x))^2/(c^5*x^2*(sqrt(-1/(c^2*x^2) + 1) + 1)^2) + 2*
a*b*arcsin(1/(c*x))/(c^5*x^2*(sqrt(-1/(c^2*x^2) + 1) + 1)^2) + a^2/(c^5*x^2*(sqrt(-1/(c^2*x^2) + 1) + 1)^2))*c

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int x\,{\left (a+b\,\mathrm {asin}\left (\frac {1}{c\,x}\right )\right )}^2 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*asin(1/(c*x)))^2,x)

[Out]

int(x*(a + b*asin(1/(c*x)))^2, x)

________________________________________________________________________________________